/**
 * 模块：医院入驻平台-SysMenu
 */
package design.onekey.controller;

import design.onekey.annotation.LoginUser;
import design.onekey.base.Response;
import design.onekey.model.dto.UserInfoDto;
import design.onekey.model.dto.IndexMenuTreeDto;
import design.onekey.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
* @Description: SysMenucontroller类
* @author
* @date 2020-06-05 04:03:09
* @version V1.0
*/
@RestController
@RequestMapping("/api/sysMenu")
public class SysMenuController {

   /**
    * iSysMenuService服务注入
    */
   @Autowired
   private ISysMenuService iSysMenuService;


   /**
    * @Title: getIndexMenu
    * @Description: 获取首页菜单树
    * @param userInfoDto
    * @return
    * @author blcloak
    * @date 2020-06-11 05:11:36
    */
   @RequestMapping(value = "/getIndexMenu",method = RequestMethod.POST)
   public Response getIndexMenu(@LoginUser UserInfoDto userInfoDto)
   {
       List<IndexMenuTreeDto> result = iSysMenuService.getIndexMenu(userInfoDto);
       return Response.success(result);
   }
}
